package com.zmm.util.document;

import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;
import java.util.Set;

/**
 * 接口文档模型
 * @author 900045
 * @description:
 * @name IdoItem
 * @date By 2021-10-26 15:20:13
 */
public class IdoItem implements Serializable {


	/**  */
	private static final long serialVersionUID = 1L;

	private String            code;

	private String            version;

	private String                name;

	private List<String> methods;

	private Set<String> patterns;

	private List<IdoParam>    reqParams;

	private List<IdoParam>    respParams;

	private String                remarks;

	public void addMethod(String method) {
		if (methods == null) {
			methods = new ArrayList<>();
		}
		methods.add(method);
	}

	public void addReqParam(IdoParam param) {
		if(reqParams == null) {
			reqParams = new ArrayList<>();
		}
		reqParams.add(param);
	}

	public void addRespParam(IdoParam param) {
		if (respParams == null) {
			respParams = new ArrayList<>();
		}
		respParams.add(param);
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public List<String> getMethods() {
		return methods;
	}

	public void setMethods(List<String> methods) {
		this.methods = methods;
	}

	public String getRemarks() {
		return remarks;
	}

	public void setRemarks(String remarks) {
		this.remarks = remarks;
	}

	public Set<String> getPatterns() {
		return patterns;
	}

	public void setPatterns(Set<String> patterns) {
		this.patterns = patterns;
	}

	public List<IdoParam> getReqParams() {
		return reqParams;
	}

	public void setReqParams(List<IdoParam> reqParams) {
		this.reqParams = reqParams;
	}

	public List<IdoParam> getRespParams() {
		return respParams;
	}

	public void setRespParams(List<IdoParam> respParams) {
		this.respParams = respParams;
	}

	public String getVersion() {
		return version;
	}

	public void setVersion(String version) {
		this.version = version;
	}

	public String getCode() {
		return code;
	}

	public void setCode(String code) {
		this.code = code;
	}

}
